<template>
  <view class="invoice">
    <view v-if="afterSalDetail !== null" class="after_top">
      <view class="after_top_tips">
        <view class="after_top_tips_status">
          <span v-if="!applyDetail.finished">申请中</span>
          <span v-else>
            已开票
          </span>
        </view>
      </view>
    </view>
    <view class="order_info">
      <view class="order_img">
        <image class="img" :src="productSquareUrl" />
      </view>
      <view>
        <view class="order_number">
          <span>订单编号：</span>
          <span>{{ orderDetail.orderNo }}</span>
        </view>
        <view>
          <span>开票金额：</span>
          <span>￥ <span class="money">{{ orderDetail.totalAmount }}</span></span>
        </view>
      </view>
    </view>
    <view v-if="id == 'undefined'">
      <view class="invoice_info">
        <view class="flex" style="align-items: center;">
          发票类型：
          <uni-data-select style="margin-right: 20rpx;" class="left_input" @change="invoiceTypeChange" :clear="false"
            v-model="invoiceInfo.invoiceType" :localdata="invoiceRange"></uni-data-select>
          <!-- <uni-data-select @change="invoiceTypeChange" style="margin-right: 20rpx;" class="left_input"
            :clear="false" v-model="invoiceInfo.invoiceType" :localdata="range1"></uni-data-select> -->
        </view>
        <view style="margin-bottom: 40rpx" class="flex">
          抬头类型：
          <radio-group class="uni-flex uni-row radio-group" @change="testChange" v-model="invoiceInfo.titleType"
            style="flex-wrap: wrap">
            <radio :value="1" :checked="invoiceInfo.titleType === 1" class="radio r2">个人</radio>
            <radio :value="0" :checked="invoiceInfo.titleType === 0" class="radio r3" style="margin-top: 20rpx">单位</radio>
          </radio-group>
        </view>
        <view style="margin-bottom: 40rpx" class="flex">
          发票内容：
          <radio-group class="uni-flex uni-row radio-group" @change="invoiceContentChange"
            v-model="invoiceInfo.invoiceContent" style="flex-wrap: wrap">
            <radio :value="'商品类别'" :checked="invoiceInfo.invoiceContent === '商品类别'" class="radio r2">商品类别</radio>
            <radio :value="'商品明细'" :checked="invoiceInfo.invoiceContent === '商品明细'" class="radio r3"
              style="margin-top: 20rpx">商品明细</radio>
          </radio-group>
        </view>
        <view class="flex text_input">
          发票抬头：
          <input class="left_input" placeholder="请输入发票抬头" maxlength="40" v-model="invoiceInfo.invoiceTitle" />
          <image class="icon_mod" @tap="selectInvoiceTitle" src="../../static/img/common/icon_mod.png" />
        </view>
        <view v-if="invoiceInfo.titleType === 0" class="flex text_input">
          单位税号：
          <input class="left_input" placeholder="填写纳税人识别号" maxlength="40" v-model="invoiceInfo.taxNumber" />
        </view>
        <view v-if="invoiceInfo.titleType === 0" class="flex text_input">
          注册地址：
          <input class="left_input"
            :placeholder="(invoiceInfo.invoiceType === 1 || invoiceInfo.invoiceType === 3) ? '必填' : '选填'" maxlength="40"
            v-model="invoiceInfo.address" />
        </view>
        <view v-if="invoiceInfo.titleType === 0" class="flex text_input">
          注册电话：
          <input class="left_input"
            :placeholder="(invoiceInfo.invoiceType === 1 || invoiceInfo.invoiceType === 3) ? '必填' : '选填'" maxlength="40"
            v-model="invoiceInfo.telephone" />
        </view>
        <view v-if="invoiceInfo.titleType === 0" class="flex text_input">
          开户银行：
          <input class="left_input"
            :placeholder="(invoiceInfo.invoiceType === 1 || invoiceInfo.invoiceType === 3) ? '必填' : '选填'" maxlength="40"
            v-model="invoiceInfo.bankName" />
        </view>
        <view v-if="invoiceInfo.titleType === 0" class="flex text_input">
          银行账号：
          <input class="left_input"
            :placeholder="(invoiceInfo.invoiceType === 1 || invoiceInfo.invoiceType === 3) ? '必填' : '选填'" maxlength="40"
            v-model="invoiceInfo.bankAccount" />
        </view>
      </view>
      <view v-if="invoiceInfo.invoiceType === 2 || invoiceInfo.invoiceType === 3" class="invoice_info">
        <block v-if="!defaultAddress">
          <view class="order-confirm-index-top-empty" @tap="selectAddress">
            <span class="order-confirm-index-top-add">+</span>
            <span>添加地址</span>
          </view>
        </block>
        <block v-else>
          <view class="order-confirm-index-top-had">
            <view class="order-address-top" @tap="selectAddress">
              <view class="address-top">
                <span class="name">{{ defaultAddress.receiverName }},</span>
                <span class="address">{{ defaultAddress.receiverTel }}</span>
              </view>
              <view class="address-bottom">
                {{
                  defaultAddress.receiverProvince +
                  defaultAddress.receiverCity +
                  defaultAddress.receiverArea +
                  defaultAddress.receiverAddress
                }}
              </view>
            </view>
            <view>
              <image class="icon_mod" @tap="selectAddress" src="../../static/img/common/icon_mod.png" />
            </view>
          </view>
        </block>
      </view>
    </view>
    <view v-else class="invoice_info">
      <view>
        <view class="apply_detail">抬头类型：
          <span v-if="applyDetail.titleType === 0">单位</span>
          <span v-else>个人</span>
        </view>
        <view class="apply_detail">
          发票内容：
          <span v-if="applyDetail.invoiceContent === '商品类别'">商品类别</span>
          <span v-else>商品明细</span>
        </view>
        <view class="apply_detail">
          发票抬头：{{ applyDetail.invoiceTitle }}
        </view>
        <view class="apply_detail" v-if="applyDetail.titleType === 0">
          单位税号：{{ applyDetail.taxNumber }}
        </view>
        <view class="apply_detail" v-if="applyDetail.titleType === 0">
          注册地址：{{ applyDetail.address }}
        </view>
        <view class="apply_detail" v-if="applyDetail.titleType === 0">
          注册电话：{{ applyDetail.telephone }}
        </view>
        <view class="apply_detail" v-if="applyDetail.titleType === 0">
          开户银行：{{ applyDetail.bankName }}
        </view>
        <view class="apply_detail" v-if="applyDetail.titleType === 0">
          银行账号：{{ applyDetail.bankAccount }}
        </view>
        <view class="apply_detail" v-if="applyDetail.finished">
          <view v-if="applyDetail.invoiceType === 0 || applyDetail.invoiceType === 1">
            <view v-for="(item, index) in invoiceUrls" :key="item" class="check_invoice">
              发票{{ index +1 }}
              <view class="copy_btn" @tap="onCopy(item)">
                复制发票链接
              </view>
              <view class="copy_btn" @tap="openFile(item)">
                查看发票
              </view>
            </view>
          </view>
          <view v-else>
            <span style="margin-right: 10rpx;">物流单号：{{ lid }}</span>
            <span class="copy_btn" @tap="onCopy(lid)"> 复制</span>
          </view>
        </view>
      </view>
    </view>
    <view class="invoice_bottom">
      <view v-if="id == 'undefined'" @click="submit" class="button_2 invoice_bottom_btn">提交申请</view>
      <view v-if="id !== 'undefined' && !applyDetail.finished" @click="onCancelInvoice"
        class="button_2 invoice_bottom_btn">取消申请</view>
      <!-- <view class="button_2 invoice_bottom_btn" v-if="applyDetail.finished && (applyDetail.invoiceType === 0 || applyDetail.invoiceType === 1)" @click="openFile">查看发票</view> -->
      <view @click="cancel" style="background-color: #fff;" class="button_3 invoice_bottom_btn">返回</view>
    </view>
  </view>
</template>

<script>
import Big from "big.js";
import { order, common, invoice } from "../../services/index.js";
import { mapState } from "vuex";
export default {
  data() {
    return {
      id: 'undefined',
      defaultAddress: null, //默认地址
      selectAddressId: undefined,
      selectInvoiceId: undefined,
      totalCount: "",
      orderDetail: {},
      applyDetail: {},
      productSquareUrl: "",
      invoiceUrl: '',
      lid: '',
      invoiceInfo: {
        invoiceType: 0,
        titleType: 1,
        invoiceTitle: '',
        taxNumber: '',
        bankName: '',
        bankAccount: '',
        telephone: '',
        address: '',
        isDefault: false,
        invoiceContent: '商品类别'
      },
      info: {
        name: "",
      },
      invoiceList: [],
      invoiceTypes: [],
      invoiceRange: [],
      range: [
        { value: 0, text: "电子普票" },
        { value: 1, text: "电子专票" },
        { value: 2, text: "纸质普票" },
        { value: 3, text: "纸质专票" },
      ],
      range1: [
        { value: 0, text: "电子普票" },
        { value: 2, text: "纸质普票" },
      ],
      userInvoiceList: [],
      selectTap: '',
      invoiceUrls: []
    };
  },
  components: {},
  computed: {
    ...mapState(["mallConfig"]),
  },
  mounted() { },
  methods: {
    async onCancelInvoice() {
      uni.showModal({
        title: "提示",
        content: "是否确认取消发票申请",
        success: async (res) => {
          if (res.confirm) {
            let res = await invoice.delApplyInvoice(this.orderDetail.orderNo);
            if (res.code === 200) {
              uni.showToast({
                title: "取消成功",
                icon: "none",
                success: function () {
                  wx.navigateBack({
                    //返回上一页
                    delta: 1,
                  });
                },
              });
            } else {
              uni.showToast({
                title: res.msg,
              });
            }
          }
        },
      });
    },
    resetInvoiceInfo() {
      this.invoiceInfo.invoiceTitle = '';
      this.invoiceInfo.taxNumber = '';
      this.invoiceInfo.bankName = '';
      this.invoiceInfo.bankAccount = '';
      this.invoiceInfo.telephone = '';
      this.invoiceInfo.address = '';
      this.invoiceInfo.invoiceContent = '商品类别';
    },
    checkName(e) {
      this.info.name = e.detail.value;
    },
    checkData(data) {
      let msg = "";
      let pattern = /^\d{1,40}$/;
      let taxPattern = /^[a-zA-Z0-9]{10,20}$/
      let telPattern = /^[\d-+]{1,40}$/;
      if (data.invoiceType === 1 || data.invoiceType === 3) {
        if (!data.bankAccount) {
          msg = '请输入开户行账号'
        }
        if (!pattern.test(data.bankAccount)) {
          msg = '银行账户只能输入数字，请重新输入'
        }
        if (!data.bankName) {
          msg = '请输入开户行名称'
        }
        if (!data.telephone) {
          msg = '请输入联系电话'
        }
        if (!telPattern.test(data.telephone)) {
          msg = '请输入正确的电话号码'
        }
        if (!data.address) {
          msg = '请输入联系地址'
        }
      }
      if (data.titleType === 0) {
        if (!data.taxNumber) {
          msg = '请输入税号'
        }
        if (!taxPattern.test(data.taxNumber)) {
          msg = '单位税号10到20位数字字母组合，请检查'
        }
      }
      if (!data.invoiceTitle) {
        msg = '请输入发票抬头'
      }
      return msg;
    },
    selectInvoiceTitle() {
      uni.navigateTo({
        url: "/pages/invoiceManager/index?from=orderInvoice",
      });
    },
    selectAddress() {
      uni.navigateTo({
        url: "/pages/addressManager/index?from=orderConfirm",
      });
    },
    async getOrderDetail(orderNo) {
      uni.showLoading();
      let res = await order.orderDetail({ orderNo });
      if (res.code === 200) {
        let temp = 0;
        let selectedObjects = [];
        let totalPrice = new Big(0);
        res.data.createTime = new Date(res.data.createTime * 1000).Format(
          "yyyy-MM-dd HH:mm:ss"
        );
        res.data.totalAmountFen = res.data.totalAmount;
        res.data.totalAmount = new Big(res.data.totalAmount).div(100);
        res.data.expressAmount = new Big(res.data.expressAmount).div(100);
        res.data.products.forEach((e) => {
          temp += e.count;
          e.price = new Big(e.price).div(100);
          totalPrice = totalPrice.plus(e.price.times(e.count)); //数量*价格
          selectedObjects.push({ invoiceTypes: e.invoiceTypes });
        });
        // 获取第一个对象的 invoiceTypes 数组作为初始值
        let initialInvoiceTypes = selectedObjects[0].invoiceTypes;
        // 对剩余对象的 invoiceTypes 数组进行交集操作
        let intersection = selectedObjects.slice(1).reduce((result, obj) => {
          return result.filter(type => obj.invoiceTypes.includes(type));
        }, initialInvoiceTypes);
        this.invoiceTypes = intersection;
        this.getInvoiceRange(true);
        if (res.data.shipTime !== null) {
          res.data.shipTime = new Date(res.data.shipTime * 1000).Format(
            "yyyy-MM-dd HH:mm:ss"
          );
        }
        if (res.data.expire !== null && res.data.orderStatus === 1) {
          this.expire = res.data.expire;
          this.countDown();
        }
        if (res.data.couponConfig !== null) {
          res.data.couponAmount = totalPrice
            .minus(res.data.totalAmount)
            .minus(res.data.expressAmount);
        }
        this.expressAmount = res.data.expressAmount;
        this.totalCount = temp;
        this.orderDetail = res.data;
        this.originPrice = totalPrice;
        this.productSquareUrl = res.data.products[0].productSquareUrl;
      }
      uni.hideLoading();
    },
    getInvoiceRange(init) {
      //根据invoiceTypes数组中的数字，查找到range中value匹配到的值组成一个数组，然后赋值给 invoiceRange
      let invoiceRange = [];
      this.invoiceTypes.forEach((e) => {
        let temp = this.range.filter((item) => {
          return item.value === e;
        });
        invoiceRange.push(temp[0]);
      });
      //如果 titleType 为 1，即个人，那么只能开电子普票和纸质普票过滤一下数据
      if (this.invoiceInfo.titleType === 1) {
        invoiceRange = invoiceRange.filter((e) => {
          return e.value === 0 || e.value === 2;
        });
      }
      //找到invoiceRange中的第一个元素把value赋值给  invoiceType 如果invoiceRange为空，那么invoiceType就为0
      if (invoiceRange.length !== 0) {
        this.invoiceInfo.invoiceType = invoiceRange[0].value;
      } else {
        this.invoiceInfo.invoiceType = 0;
      }
      this.invoiceRange = invoiceRange;
      if (init) {
        this.checkDefaultInvoice();
      }
    },
    checkSame(invoiceType, titleType) {
      let defaultInvoice = this.invoiceList.filter((e) => {
        return (e.invoiceType === invoiceType && titleType === e.titleType)
      });
      if (defaultInvoice.length !== 0) {
        let data = JSON.parse(JSON.stringify(defaultInvoice[0]));
        //默认为商品类别
        data.invoiceContent = '商品类别';
        this.invoiceInfo = data;
      } else {
        this.resetInvoiceInfo();
      }
    },
    invoiceTypeChange(i) {
      this.checkSame(i, this.invoiceInfo.titleType);
    },
    testChange(e) {
      this.invoiceInfo.titleType = Number(e.detail.value);
      this.checkSame(this.invoiceInfo.invoiceType, Number(e.detail.value));
      this.getInvoiceRange(false);
    },
    invoiceContentChange(e) {
      this.invoiceInfo.invoiceContent = e.detail.value;
    },
    onLoad(params) {
      uni.showLoading();
      // #ifdef H5
      let count = 0;
      let timer = setInterval(() => {
        if (count > 10) {
          //跳转到发票列表
          clearInterval(timer);
          uni.navigateTo({
            url: "/pages/invoiceList/index",
          });
        } else if (this.flutterDone || this.userToken !== null) {
          clearInterval(timer);
          let that = this;
          this.getOrderDetail(params.orderNo);
          uni.getStorage({
            key: "selectAddressId",
            success(res) {
              that.selectAddressId = res.data;
            },
          });
          uni.getStorage({
            key: "selectInvoiceId",
            success(res) {
              that.selectInvoiceId = res.data;
            },
          });
          if (params.orderNo) {
            //selectTap 0 未申请 1已申请 2已开票
            if (params.selectTap == 1) {
              this.applyingDetail(params.orderNo);
            }
            if (params.selectTap == 2 || !params.selectTap) {
              this.appliedDetail(params.orderNo);
            }
            this.selectTap = params.selectTap;
            // this.applyingDetail(params.orderNo);
            this.id = params.id;
          }
        }
        count++;
      }, 1000);
      // #endif

      // #ifdef MP-WEIXIN 
      let that = this;
      this.getOrderDetail(params.orderNo);
      uni.getStorage({
        key: "selectAddressId",
        success(res) {
          that.selectAddressId = res.data;
        },
      });
      uni.getStorage({
        key: "selectInvoiceId",
        success(res) {
          that.selectInvoiceId = res.data;
        },
      });
      if (params.orderNo) {
        //selectTap 0 未申请 1已申请 2已开票
        if (params.selectTap == 1) {
          this.applyingDetail(params.orderNo);
        }
        if (params.selectTap == 2) {
          this.appliedDetail(params.orderNo);
        }
        this.selectTap = params.selectTap;
        // this.applyingDetail(params.orderNo);
        this.id = params.id;
      }
      // #endif
    },
    onShow(params) {
      let that = this;
      uni.getStorage({
        key: "selectAddressId",
        success(res) {
          that.selectAddressId = res.data;
        },
      });
      uni.getStorage({
        key: "selectInvoiceId",
        success(res) {
          that.selectInvoiceId = res.data;
        },
      });
      uni.showLoading();
      // #ifdef H5
      let count = 0;
      let timer = setInterval(() => {
        if (count > 10) {
          //跳转到发票列表
          clearInterval(timer);
          uni.navigateTo({
            url: "/pages/invoiceList/index",
          });
        } else if (this.flutterDone || this.userToken !== null) {
          clearInterval(timer);
          this.addressQuery();
          this.getInvoiceTitleList();
        }
        count++;
      }, 1000);
      // #endif

      // #ifdef MP-WEIXIN 
      this.addressQuery();
      this.getInvoiceTitleList();
      // #endif
    },
    async appliedDetail(id) {
      uni.showLoading();
      let res = await invoice.appliedDetail(id);
      if (res.code === 200) {
        this.applyDetail = res.data;
        if (res.data.finished) {
          this.invoiceUrl = res.data.invoiceUrl;
          this.invoiceUrls = res.data.invoiceUrls.split(',');
          this.lid = res.data.lid;
        }
      }
      uni.hideLoading();
    },
    async applyingDetail(id) {
      uni.showLoading();
      let res = await invoice.applyingDetail(id);
      if (res.code === 200) {
        this.applyDetail = res.data;
        if (res.data.finished) {
          this.invoiceUrl = res.data.invoiceUrl;
          this.lid = res.data.lid;
        }
      }
      uni.hideLoading();
    },
    checkDefaultInvoice() {
      let defaultInvoice = this.userInvoiceList.find((e) => {
        if (this.selectInvoiceId) {
          return e.id === this.selectInvoiceId;
        } else {
          return e.isDefault;
        }
      });
      if (defaultInvoice) {
        //判断是否 invoiceRange中有这个发票类型 如果有执行下面的操作
        let invoiceRange = this.invoiceRange.filter((e) => {
          return e.value === defaultInvoice.invoiceType
        })
        if (invoiceRange.length !== 0) {
          let data = JSON.parse(JSON.stringify(defaultInvoice));
          data.invoiceContent = '商品类别';
          this.invoiceInfo = data;
        }
      }
    },
    async getInvoiceTitleList() {
      let res = await invoice.getInvoiceTitleList();
      if (res.code === 200) {
        this.userInvoiceList = res.data;
        this.checkDefaultInvoice();
      }
    },
    async addressQuery() {
      uni.showLoading();
      let res = await common.addressQuery();
      if (res.code === 200) {
        let defaultAddress = res.data.find((e) => e.defaultType === 1);
        if (this.selectAddressId) {
          defaultAddress = res.data.find(
            (e) => e.receiverId === this.selectAddressId
          );
        }
        if (defaultAddress) {
          this.defaultAddress = defaultAddress;
        } else if (res.data.length !== 0) {
          this.defaultAddress = res.data[0];
        }
        this.addLists = res.data;
      }
      uni.hideLoading();
    },
    async submit() {
      uni.showLoading();
      let addressStr = '地址：' + this.defaultAddress.receiverProvince + this.defaultAddress.receiverCity + this.defaultAddress.receiverArea + this.defaultAddress.receiverAddress + '姓名：' + this.defaultAddress.receiverName + '电话：' + this.defaultAddress.receiverTel;
      let data = JSON.parse(JSON.stringify(this.invoiceInfo));
      data.orderNo = this.orderDetail.orderNo;
      data.invoiceFee = this.orderDetail.totalAmountFen;
      data.remark = addressStr;
      let msg = this.checkData(data);
      if (msg) {
        uni.showToast({
          title: msg,
          icon: "none",
        });
        return false;
      }
      if (this.actionLock) {
        return false;
      }
      this.actionLock = true;
      let res = await invoice.applyInvoice(data);
      if (res.code === 200) {
        uni.showToast({
          title: "提交成功",
          icon: "none",
          success: function () {
            wx.navigateBack({
              //返回上一页
              delta: 1,
            });
          },
        });
      } else {
        uni.showToast({
          title: res.msg,
        });
      }
      this.actionLock = false;
      uni.hideLoading();
    },
    cancel() {
      //如果 selectTap不为空 后退
      if (this.selectTap) {
        uni.navigateBack({
          delta: 1,
        });
      } else {
        uni.switchTab({
          url: "/pages/invoiceList/index",
        });
      }
    },
    onCopy(item) {
      uni.setClipboardData({
        data: item,
        success: function () {
        }
      });
    },
    openFile(invoiceUrl) {
      let url = invoiceUrl;
      //如果是h5直接跳转到URL 如果是小程序环境 使用uni.openDocument打开URL中的文档   
      // #ifdef H5
      //直接跳转到URL
      window.location.href = url;
      // #endif
      // #ifdef MP-WEIXIN
      uni.showLoading({
        title: '加载中'
      })
      uni.downloadFile({
        url: url,
        success: function (res) {
          var filePath = res.tempFilePath;
          uni.openDocument({
            filePath: filePath,
            fileType: 'pdf',
            success: function (res) {
              uni.hideLoading();
            }
          })
        }
      })
      uni.hideLoading();
      // #endif
    }
  },
};
</script>

<style scoped>
.invoice {
  min-height: 100vh;
  background-color: #F7F8FA;
  box-sizing: border-box;
  padding-bottom: 200rpx;
}

.img {
  width: 150rpx;
  height: 150rpx;
  margin-bottom: 5rpx;
}

.order_info {
  margin: 0 auto;
  width: 90%;
  display: flex;
  border-radius: 20rpx;
  background-color: #fff;
  padding: 25rpx;
}

.invoice_info {
  margin: 25rpx auto 0;
  width: 90%;
  border-radius: 20rpx;
  background-color: #fff;
  padding: 25rpx;
}

.order_img {
  margin-right: 20rpx;
}

.order_number {
  margin-bottom: 10rpx;
  word-break: break-all;
}

.money {
  color: rgba(242, 85, 0, 1);
  font-size: 40rpx;
}

.flex {
  display: flex;
  align-items: flex-end;
  margin-bottom: 30rpx;
}

.type_select {
  flex: 1;
  font-size: 32rpx;
}

.left_input {
  border: none;
  flex: 1;
}

.radio {
  margin-right: 10rpx;
}

.text_input {
  margin-bottom: 40rpx;
}

.order-confirm-index-top-empty {
  background: #fff;
  display: flex;
  align-items: center;
  font-size: 30rpx;
  color: #333;
}

.order-confirm-index-top-had {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  font-size: 30rpx;
  color: #333;
}

.order-address-top {
  flex: 1;
}

.order-confirm-index-top-add {
  font-size: 100rpx;
  margin: -20rpx 20rpx 0 50rpx;
}

.address-top {
  font-size: 32rpx;
  font-weight: bold;
  color: rgba(51, 51, 51, 1);
  line-height: 36rpx;
  width: 88%;
}

.address-bottom {
  font-size: 32rpx;
  color: rgba(85, 85, 85, 1);
  line-height: 36rpx;
  width: 88%;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon_mod {
  width: 30rpx;
  height: 30rpx;
  margin-right: 30rpx;
}

.invoice_bottom {
  position: fixed;
  bottom: 0;
  width: 96%;
  margin: 0 auto;
  left: 0;
  right: 0;
  background-color: #fff;
  z-index: 100;
}

.invoice_bottom_btn {
  width: 100%;
  border-radius: 10rpx;
  margin-bottom: 15rpx;
  text-align: center;
  height: 80rpx;
  line-height: 80rpx;
}

.apply_detail {
  margin-bottom: 25rpx;
}

.after_top {
  width: 100%;
  height: 256rpx;
  background: linear-gradient(90deg, #FF6146 0%, #FEC56E 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 20rpx;
  border-bottom-left-radius: 30rpx;
  border-bottom-right-radius: 30rpx;
}

.after_top_tips_status {
  font-size: 40rpx;
  margin-bottom: 10rpx;
}

.copy_btn {
  cursor: pointer;
  color: #007AFF;
}
.check_invoice{
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
</style>
<style>
.uni-select {
  border: none !important;
}

.uni-select__input-text {
  font-size: 32rpx;
}
</style>
